<template>
  <div>
    <index-cmpt :models="models"></index-cmpt>
  </div>
</template>

<script>
import IndexCmpt from '@/credit/views/city/bus/index/IndexCmpt'
import { mapGetters } from 'vuex'
export default {
  components: {
    IndexCmpt,
  },
  props: {},
  data() {
    return {}
  },
  computed: {
    ...mapGetters(['taskCountBusUnion']),
    models() {
      return [
        {
          title: '项目立项',
          subTitle: '待办',
          subCount: this.taskCountBusUnion.p || 0,
          url: '/credit/task/item',
          handlerUrl: '/credit/task/item_no',
        },
        {
          title: '项目调查',
          subTitle: '待办',
          subCount: this.taskCountBusUnion.p1 || 0,
          url: '/credit/task/invest',
          handlerUrl: '/credit/task/invest_no',
        },
        {
          title: '合同处理',
          subTitle: '待办',
          subCount: this.taskCountBusUnion.p2 || 0,
          url: '/credit/task/contract',
          handlerUrl: '/credit/task/contract_no',
        },
        {
          title: '签约管理',
          subTitle: '待办',
          subCount: this.taskCountBusUnion.p3 || 0,
          url: '/credit/task/sign',
          handlerUrl: '/credit/task/sign_no',
        },
        {
          title: '放款申请',
          subTitle: '待办',
          subCount: this.taskCountBusUnion.p4 || 0,
          url: '/credit/task/loan',
          handlerUrl: '/credit/task/loan_no',
        },
        {
          title: '放款登记',
          subTitle: '待办',
          subCount: this.taskCountBusUnion.p5 || 0,
          url: '/credit/task/register',
          handlerUrl: '/credit/task/register_no',
        },
        {
          title: '贷后管理',
          subTitle: '到期',
          subCount: this.taskCountBusUnion.p6 || 0,
          url: '/credit/task/postloan',
          handlerUrl: '/credit/task/postloan_no',
        },
      ]
    },
  },
  watch: {},
  created() {
    this.$store.dispatch('getTaskCountBusUnion')
  },
  mounted() {},
  methods: {},
}
</script>

<style lang="scss" scoped></style>
